package com.ss.android.action;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.TextView;

import com.ss.android.article.browser.R;

public class ActionAnimView extends TextView {
    private Animation a;

    public ActionAnimView(Context arg2) {
        super(arg2);
        this.onAnimationEnd();
        int v0 = R.anim.k;
        try {
            this.a = AnimationUtils.loadAnimation(arg2, v0);
        }
        catch(Exception v0_1) {
            this.a = null;
        }
    }

    public ActionAnimView(Context arg2, AttributeSet arg3) {
        super(arg2, arg3);
        int v0 = R.anim.k;
        try {
            this.a = AnimationUtils.loadAnimation(arg2, v0);
        }
        catch(Exception v0_1) {
            this.a = null;
        }
    }

    public ActionAnimView(Context arg2, AttributeSet arg3, int arg4) {
        super(arg2, arg3, arg4);
        int v0 = R.anim.k;
        try {
            this.a = AnimationUtils.loadAnimation(arg2, v0);
        }
        catch(Exception v0_1) {
            this.a = null;
        }
    }

    public final void a() {
        if(this.a != null) {
            this.clearAnimation();
            this.a.reset();
            this.setVisibility(View.VISIBLE);
            this.startAnimation(this.a);
        }
    }

    protected void onAnimationEnd() {
        super.onAnimationEnd();
        this.setVisibility(View.INVISIBLE);
    }
}

